#pragma once

#include "Types.h"

namespace TrueText {

class TextBounds 
{
public:
	TextBounds()
		: dimensions(0, 0)
		, topBaselineDistance(0)
		, bottomBaselineDistance(0)
	{
	}

	TextBounds(const TextBounds& rhs)
		: dimensions(rhs.dimensions)
		, topBaselineDistance(rhs.topBaselineDistance)
		, bottomBaselineDistance(rhs.bottomBaselineDistance)
	{
	}

	const TextBounds& operator=(const TextBounds& rhs)
	{
		if (this == &rhs)
			return *this;

		dimensions = rhs.dimensions;
		topBaselineDistance = rhs.topBaselineDistance;
		bottomBaselineDistance = rhs.bottomBaselineDistance;

		return *this;
	}
public:
	const Dimensions& GetDimensions() const { return dimensions; } 
	void SetDimensions(const Dimensions& value) { dimensions = value; }

	// Distance in pixels from the top of the bitmap to the baseline of first line of text.
	int GetTopBaselineDistance() const { return topBaselineDistance; }
	void SetTopBaselineDistance(int value) { topBaselineDistance = value; }

	int GetBottomBaselineDistance() const { return bottomBaselineDistance; }
	void SetBottomBaselineDistance(int value) { bottomBaselineDistance = value; }
private:
	Dimensions dimensions;
	int topBaselineDistance;
	int bottomBaselineDistance;
};

}